package cn.edu.scujcc.customofsichuan.Dao;


import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

import cn.edu.scujcc.customofsichuan.Entity.User;

@Dao
public interface UserDao {
    @Insert
    void insertUser(User...user);

    @Delete
    void deleteUser(User... user);

    @Query("SELECT * FROM UserInfo  WHERE account=:account")
    User selectByAccount(String account);

    @Query("SELECT * FROM UserInfo")
    List<User> selectAll();

    @Update
    void updateUser(User... user);

}
